home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / SaveChanges.as < prev    next >
Encoding:
Text File  |  1998-01-12  |  744 b   |  21 lines  |  [TEXT/ToyS]

  1. on SaveChanges(theType, theName)
  2.     set dlog to dd auto dialog {size:[400, 110], contents:[¬
  3.         {class:push button, bounds:[330, 80, 390, 100], name:"Save"}, ¬
  4.         {class:push button, bounds:[250, 80, 310, 100], name:"Cancel"}, ¬
  5.         {class:push button, bounds:[68, 80, 158, 100], name:"Don’t Save"}, ¬
  6.         {class:icon, bounds:[13, 10, 45, 42], contents:2}, ¬
  7.         {class:static text, bounds:[68, 10, 390, 58], contents:"Save changes to the " & ¬
  8.             theType & " “" & theName & "” before closing?"}] ¬
  9.         } with grayscale
  10.     
  11.     if item 1 of dlog then
  12.         return "Save"
  13.     else if item 2 of dlog then
  14.         return "Cancel"
  15.     else if item 3 of dlog then
  16.         return "Don’t Save"
  17.     end if
  18.     error -128
  19. end SaveChanges
  20.  
  21. SaveChanges("test document", "Dialog Director (data file)")